package com.example.designModel.strategy;

/**
 * 打折收费
 */
public class CashDisCount extends CashSuper {

    private double moneyDiscount = 1d;

    public CashDisCount(String moneyDiscount) {
        this.moneyDiscount = Double.parseDouble(moneyDiscount);
    }

    @Override
    public double acceptCash(double money) {

        return money * moneyDiscount;
    }
}
